package cn.stronglink.assetmanage.business.check.presenter;

import java.util.List;

import cn.stronglink.assetmanage.business.check.model.CheckedAssetModel;
import cn.stronglink.assetmanage.business.check.model.CheckedModel;
import cn.stronglink.assetmanage.business.check.view.checked.CheckedAssetView;
import cn.stronglink.assetmanage.business.check.view.checked.CheckedListView;
import cn.stronglink.assetmanage.entity.Asset;
import cn.stronglink.assetmanage.entity.Check;
import cn.stronglink.assetmanage.index.base.BasePresenter;

/**
 * Created by chencongcong on 2018/6/12.
 */

public class CheckedAssetPresenter extends BasePresenter {
    private CheckedAssetView checkedAssetView;
    private CheckedAssetModel checkedModel;
    //具体某个表单资源列表
    private List<Asset> orderList;

    public CheckedAssetPresenter(CheckedAssetView checkedAssetView, CheckedAssetModel checkedAssetModel) {
        this.checkedAssetView = checkedAssetView;
        this.checkedModel = checkedAssetModel;
    }


    @Override
    public void onStart() {

    }

    @Override
    public void onStop() {

    }

    @Override
    public void start() {

    }



    /**
     *根据表单id显示表单中的资产列表
     * @param orderNo
     */
    public void showOrderDataByOrderId(String orderNo) {
        orderList = checkedModel.getDataByOrderNo(orderNo);
        checkedAssetView.setOrderData(orderList);
        checkedAssetView.showAssetTitle(checkedModel.getCheckByOrderNo(orderNo));
    }
}
